From 4072beb6dad4113fef5b4555ec4af0c19d148bc0 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sun, 18 Dec 2022 01:34:32 +0100
Subject: [PATCH] remove CC check

The CC variable is allowed to contain arguments, but the way it
is checked here does not guarantee that. The FreeBSD shell is
POSIX compliant here - the command builtin is not expected to
take any additional arguments when used with -v. That breaks the
check when CC actually contains them. As we control the build
environment and there doesn't seem to be a simple way to split
off just the command part, just remove the check.

Ref https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
---
 scripts/Kconfig.include | 2 --
 1 file changed, 2 deletions(-)

diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index 2741253..4f4e379 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -35,8 +35,6 @@ ld-option = $(success,$(LD) -v $(1))
 # Return y if the assembler supports <instr>, n otherwise
 as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -)
 
-# check if $(CC) and $(LD) exist
-$(error-if,$(failure,command -v $(CC)),C compiler '$(CC)' not found)
 $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
 
 # Get the C compiler name, version, and error out if it is not supported.
-- 
2.38.1

